package com.dream.libxrec.sound;

import android.content.Context;
import android.os.Bundle;
import com.dream.libxrec.encode.audio.IAudioEncoder;

public abstract class ISoundRec {
    protected ISoundRecListener mSoundRecListener = null;

    public abstract ISoundRec init(Context ct, int sampleRate,
                              int channelNum,int quantBits
            , Bundle extra);

    public void setISoundRecListener(ISoundRecListener listener){
        this.mSoundRecListener = listener;
    }

    public abstract boolean isRun();

    public abstract void start();
    public abstract void stop();

    public interface ISoundRecListener{
        public void onSoundRec(byte[] pcm,int size);
    }
}
